feat: 增加可选的 UDP 缓冲上限设置 - #1318
Open
rponeawa wants to merge 2 commits into
Open
Conversation
部分 Mihomo/quic-go 构建不显式调用 setsockopt,UDP socket 缓冲直接 继承内核 default 值。实测仅提高 max 无法改善吞吐(仍被限制在约 229KB),需同时提高 rmem_default/wmem_default 才生效。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
小米/红米官方固件默认把内核 UDP 缓冲限制在 229376 字节(
rmem_max/wmem_max及默认值rmem_default/wmem_default),导致 Mihomo 使用 Hysteria2/QUIC 时吞吐严重受限。实测(百兆宽带,经路由器透明代理):
部分 Mihomo/quic-go 构建不显式调用 setsockopt,socket 缓冲直接继承内核 default 值,因此仅提高
max无法生效,需同时提高default。本次在功能设置中新增独立开关(默认关闭)。开启后仅在 CrashCore 启动前把低于 16 MiB 的
rmem_max/wmem_max/rmem_default/wmem_default提高至 16 MiB;不覆盖用户已有的更高值,关闭时不会降低现有系统值。